Skip to content

Conversation

gururaj1512
Copy link
Member

Resolves None

Description

What is the purpose of this pull request?

This pull request:

  • feat: add ndarray/base/binary-reduce-strided1d-dispatch

Related Issues

Does this pull request have any related issues?

This pull request:

  • resolves None

Questions

Any questions for reviewers of this pull request?

No.

Other

Any other information relevant to this pull request? This may include screenshots, references, and/or implementation notes.

No.

Checklist

Please ensure the following tasks are completed before submitting this pull request.


@stdlib-js/reviewers

@gururaj1512 gururaj1512 added GSoC Google Summer of Code. gsoc: 2025 Google Summer of Code (2025). labels Aug 18, 2025
@kgryte
Copy link
Member

kgryte commented Aug 29, 2025

/stdlib merge

@stdlib-bot stdlib-bot added the bot: In Progress Pull request is currently awaiting automation. label Aug 29, 2025
@kgryte kgryte added Feature Issue or pull request for adding a new feature. and removed bot: In Progress Pull request is currently awaiting automation. labels Aug 29, 2025
@kgryte
Copy link
Member

kgryte commented Aug 29, 2025

This PR is dependent on #7904.

@kgryte
Copy link
Member

kgryte commented Sep 8, 2025

/stdlib merge

@stdlib-bot stdlib-bot added the bot: In Progress Pull request is currently awaiting automation. label Sep 8, 2025
@kgryte kgryte marked this pull request as ready for review September 8, 2025 05:47
@stdlib-bot stdlib-bot added the Needs Review A pull request which needs code review. label Sep 8, 2025
@stdlib-bot stdlib-bot removed the bot: In Progress Pull request is currently awaiting automation. label Sep 8, 2025
@stdlib-bot
Copy link
Contributor

stdlib-bot commented Sep 8, 2025

Coverage Report

Package Statements Branches Functions Lines
ndarray/base/binary-reduce-strided1d-dispatch $\color{red}470/878$
$\color{green}+53.53\%$
$\color{green}4/4$
$\color{green}+100.00\%$
$\color{red}0/7$
$\color{green}+0.00\%$
$\color{red}470/878$
$\color{green}+53.53\%$

The above coverage report was generated for the changes in this PR.

@kgryte
Copy link
Member

kgryte commented Sep 8, 2025

@gururaj1512 Now that #7904 is merged, is there anything else you want to do to this PR before review?

Note that I changed some of the logic in #7904. In particular, for each input ndarray, to determine the casting data type, one would do

var idt1 = getDType( x1 );
var idt2 = getDType( x2 );

var dt1 = binaryCastingDataType( idt1, idt2, odt, policy );
var dt2 = binaryCastingDataType( idt2, idt1, odt, policy );

Here, the first argument corresponds to the array dtype that you want to figure out the casting data type and the second argument corresponds to the "additional"/other input ndarray data type.

@kgryte
Copy link
Member

kgryte commented Sep 8, 2025

The lint failure seems to be due to a recently added lint rule which is buggy.

cc @Planeshifter

@kgryte
Copy link
Member

kgryte commented Sep 8, 2025

/stdlib merge

@stdlib-bot stdlib-bot added the bot: In Progress Pull request is currently awaiting automation. label Sep 8, 2025
@stdlib-bot stdlib-bot removed the bot: In Progress Pull request is currently awaiting automation. label Sep 8, 2025
@kgryte kgryte added Needs Review A pull request which needs code review. and removed Needs Review A pull request which needs code review. labels Sep 10, 2025
---
type: pre_commit_static_analysis_report
description: Results of running static analysis checks when committing changes.
report:
  - task: lint_filenames
    status: passed
  - task: lint_editorconfig
    status: passed
  - task: lint_markdown
    status: na
  - task: lint_package_json
    status: na
  - task: lint_repl_help
    status: na
  - task: lint_javascript_src
    status: passed
  - task: lint_javascript_cli
    status: na
  - task: lint_javascript_examples
    status: na
  - task: lint_javascript_tests
    status: na
  - task: lint_javascript_benchmarks
    status: na
  - task: lint_python
    status: na
  - task: lint_r
    status: na
  - task: lint_c_src
    status: na
  - task: lint_c_examples
    status: na
  - task: lint_c_benchmarks
    status: na
  - task: lint_c_tests_fixtures
    status: na
  - task: lint_shell
    status: na
  - task: lint_typescript_declarations
    status: na
  - task: lint_typescript_tests
    status: na
  - task: lint_license_headers
    status: passed
---
@gururaj1512
Copy link
Member Author

@kgryte, I have refactored the code as per changed #7904.
Here, inputs cast individually for each ndarray instead of to common type.
Ready for review

@kgryte kgryte self-requested a review September 13, 2025 09:27
---
type: pre_commit_static_analysis_report
description: Results of running static analysis checks when committing changes.
report:
  - task: lint_filenames
    status: passed
  - task: lint_editorconfig
    status: passed
  - task: lint_markdown
    status: passed
  - task: lint_package_json
    status: passed
  - task: lint_repl_help
    status: skipped
  - task: lint_javascript_src
    status: passed
  - task: lint_javascript_cli
    status: na
  - task: lint_javascript_examples
    status: passed
  - task: lint_javascript_tests
    status: na
  - task: lint_javascript_benchmarks
    status: passed
  - task: lint_python
    status: na
  - task: lint_r
    status: na
  - task: lint_c_src
    status: na
  - task: lint_c_examples
    status: na
  - task: lint_c_benchmarks
    status: na
  - task: lint_c_tests_fixtures
    status: na
  - task: lint_shell
    status: na
  - task: lint_typescript_declarations
    status: passed
  - task: lint_typescript_tests
    status: passed
  - task: lint_license_headers
    status: passed
---
@kgryte kgryte removed the Needs Review A pull request which needs code review. label Sep 13, 2025
Copy link
Member

@kgryte kgryte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM after clean-up.

@kgryte
Copy link
Member

kgryte commented Sep 13, 2025

As the CI lint failure is expected, I'll go ahead and merge.

@kgryte kgryte merged commit ce2a417 into stdlib-js:develop Sep 13, 2025
11 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Issue or pull request for adding a new feature. GSoC Google Summer of Code. gsoc: 2025 Google Summer of Code (2025).
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants